home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr01 / halcn305.zip / GSDMO_VU.PAS < prev    next >
Pascal/Delphi Source File  |  1993-04-21  |  2KB  |  69 lines

  1. program GSDMO_VU;
  2. {------------------------------------------------------------------------------
  3.                                  DBase Viewer
  4.  
  5.        Copyright (c)  Richard F. Griffin
  6.  
  7.        14 January 1993
  8.  
  9.        102 Molded Stone Pl
  10.        Warner Robins, GA  31088
  11.  
  12.        -------------------------------------------------------------
  13.        This program demonstrates how to view a dBase memo file using
  14.        Griffin Solutions units.
  15.  
  16.        If the GSDMO_07.DBF file does not exist, the program will display a
  17.        a message that the file was not found and to run GSDMO_07 to make
  18.        the file.
  19.  
  20. -------------------------------------------------------------------------------}
  21. {$N+,E+}          {Required for floating point number handling}
  22.  
  23. uses
  24.    CRT,
  25.    GSOB_EDT,
  26.    GSOB_DSK,
  27.    GSOBShel;
  28. var
  29.    MyEdit  : GSO_ShowView;
  30.    Ch      : char;
  31.  
  32. procedure ShowTheMemo;
  33. var
  34.    b    : boolean;
  35.    ml   : integer;
  36. begin
  37.    MemoGet('COMMENTS');
  38.    ml := MemoLines;
  39.    if ml <> 0 then
  40.    begin
  41.       window(1,2,80,25);
  42.       MyEdit.Init(DBFActive^.MemoFile^.MemoCollect);
  43.       b := MyEdit.WorkView;
  44.       window(1,1,80,25);
  45.    end;
  46. end;
  47.  
  48. begin
  49.    ClrScr;
  50.    if not GS_FileExists('GSDMO_07.DBF') then
  51.    begin
  52.       Writeln('File GSDMO_07.DBF is unavailable. Run GSDMO_07.PAS');
  53.       halt;
  54.    end;
  55.    Select(1);
  56.    Use('GSDMO_07');
  57.    MemoWidth(75);     {sets width of the memo line.  Default is 50}
  58.    GoTop;
  59.    while not dEOF do
  60.    begin
  61.       ClrScr;
  62.       writeln(FieldGet('LASTNAME'),', ',
  63.               FieldGet('FIRSTNAME'));
  64.       ShowTheMemo;
  65.       Skip(1);
  66.    end;
  67.    CloseDataBases;
  68. end.
  69.